export function useConfig() {
  const queryParams = ref<Recordable>({})

  const tableColumns = computed(() =>
    buildColumns([
      {
        dataIndex: 'login_at',
        title: '登录时间',
        minWidth: 180,
        sortable: sortableSettings,
        format: 'date-time',
      },
      {
        dataIndex: 'username',
        title: '账号',
        minWidth: 140,
      },

      {
        dataIndex: 'login_ip',
        title: '登录IP',
        minWidth: 120,
        format: 'copy',
      },
      {
        dataIndex: 'login_addr',
        title: '所在地',
        minWidth: 180,
      },
      {
        dataIndex: 'system_info',
        title: '系统版本',
        minWidth: 180,
      },
      {
        dataIndex: 'browser_info',
        title: '浏览器版本',
        minWidth: 180,
      },
    ]),
  )

  // const schemes: CloudFilterBarScheme = {
  //   widgets: [
  //     {
  //       widget: 'select',
  //       field: 'admin_id',
  //       allText: '全部账号',
  //       fn: () => getAdminsListApi({ limit: 0 }),
  //       fieldNames: { value: 'id', label: 'username' },
  //     },
  //   ],
  // }

  // const state = ref<CloudFilterBarState>({})
  return { queryParams, tableColumns }
}
